<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
	<div class="mc">
		<div class="mc-l">
			<!--左侧导航---{-->
			<div id="navPanelContainer">
				<div class="system-logo cd"></div>
				<!--管理员信息---{-->
				<#include "../adminInfo.html">
					<!--管理员信息---}-->
					<div class="nav-wrap">
						<#include "left.html">
					</div>
			</div>
			<!--左侧导航---}-->
		</div>
		<div class="mc-m">
			<div class="navToggle"></div>
		</div>
		<div class="mc-r">
			<!--顶部导航---{-->
			<#include "../topNav.html">
				<!--顶部导航---}-->

				<!--面包屑导航---{-->
				<#assign moduleName="管理权限">
					<#include "banner.html">
						<!--面包屑导航---}-->

						<!--工具栏--{-->
						<div id="toolbar" class="clearfix">
							<div class="toolbor-module search">
								<input type="button" class="input-button return" value="返回" onclick="history.go(-1)">
							</div>
						</div>
						<!--工具栏--}-->

						<div id="main" class="clearfix">
							<form enctype="multipart/form-data" name="form1" method="post" action="" onsubmit="return check_form();">
								<p style="margin-bottom:14px;">类型名称：<strong>${role.name!"-"}</strong></p>
								<div id="parametersTab" class="bl">

									<ul class="clearfix tab_2">
										<#list purviews as item>
											<li><div class="t"><input type="checkbox" value="${item.model.purview.id?c}" name="firstIds" <#if item.model.checked??&&item.model.checked >checked="checked"</#if>>${item.model.purview.name}:</div></li>
										</#list>
									</ul>

									<#list purviews as item>
										<div class="hidden customer-info">
											<ul class="title-c">
												<#list item.childs as subitem>
													<li>
														<div class="title"><input type="checkbox" value="${subitem.model.purview.id?c}" name="secondIds" <#if subitem.model.checked??&&subitem.model.checked >checked="checked"</#if>>${subitem.model.purview.name}</div>
														<div class="v clearfix">
															<#list subitem.childs as thriditem>
																<#assign purview = thriditem.model.purview>
																	<#if purview.allowDistribute?? && purview.allowDistribute == 1>
																		<label>
																			<input type="checkbox" value="${thriditem.model.purview.id?c}" name="thirdIds" id="other" <#if thriditem.model.checked??&&thriditem.model.checked >checked="checked"</#if> />
																			${thriditem.model.purview.name}
																		</label>
																	</#if>
															</#list>
														</div>
													</li>
												</#list>
											</ul>
										</div>
									</#list>

								</div>
								<div id="bottomToolbar" class="clearfix">
									<input type="hidden" name="user_typeid" value="${(role.typeId!0)?c}" />
									<input type="hidden" name="actionType" value="setPurview" />
									<input type="submit" value="提交" class="input-button post" />
									<input type="reset" name="reset" class="input-button post" value="重置" />
								</div>

							</form>

						</div>
		</div>
	</div>
	<div class="mc-b">
		<#include "../foot.html">
	</div>
	<#include "../jsPage.html">
		<script>
            $(function(){
                $(".tab_2 .t").eq(0).addClass("active");
                $(".customer-info").eq(0).removeClass("hidden");
            });
		</script>
    </body>
</html>